import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/login/Login'
import Main from '../views/main/Main'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/Main',
      name: 'Main',
      component: Main,
      meta: {
        requireAuth: true // 标识该路由是否需要登录
      }
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login,
      meta: {
        requireAuth: false // 标识该路由是否需要登录
      }
    },
    {
      path: '/',
      redirect: '/Login'
    }
  ]
})
